package interpreter;
import java.math.BigDecimal;
import java.math.MathContext;


public class TimesBinExpr extends BinExpr{
	
	private TimesBinExpr(Expr l, Expr r){
		super(l,r);
	}
	
	public static Expr _(Expr l, Expr r){
		return new TimesBinExpr(l, r);
	}

	@Override
	public BigDecimal evaluate(Env env) throws Exception{
		return l.evaluate(env).multiply(r.evaluate(env),MathContext.DECIMAL128);
	}

}
